package com.ruihu.admin.module.business.task.domain.vo;

import com.ruihu.admin.module.business.task.domain.dto.ElectricCoreDataDTO;
import lombok.Data;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;

/**
 *  [ 电芯拆解数据 ]
 *
 * @author Tony
 * @version 1.0
 * @company 瑞虎（南京）信息技术有限公司
 * @copyright (c) 瑞虎（南京）信息技术有限公司Inc. All rights reserved.
 * @date  2022-10-21 13:38:51
 * @since JDK1.8
 */

@Data
public class ElectricCoreDataVO {
    @ApiModelProperty("ID")
    private Long id;

    @ApiModelProperty("子任务ID")
    private Long subTaskId;

    @ApiModelProperty("电芯电压")
    private String voltage;

    @ApiModelProperty("电芯重量")
    private String weight;

    @ApiModelProperty("极组合芯厚度")
    private String cellThickness;

    @ApiModelProperty("极组厚度")
    private String groupThickness;

    @ApiModelProperty("正极柱下侧1")
    private String positivePoleBottom1;

    @ApiModelProperty("防爆阀下侧1")
    private String explosionTrapBottom1;

    @ApiModelProperty("负极柱下侧1")
    private String negativePoleBottom1;

    @ApiModelProperty("正极柱下侧2")
    private String positivePoleBottom2;

    @ApiModelProperty("防爆阀下侧2")
    private String explosionTrapBottom2;

    @ApiModelProperty("负极柱下侧2")
    private String negativePoleBottom2;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty("创建人")
    private Integer createBy;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty("更新人")
    private Integer updateBy;


    public static ElectricCoreDataVO convertToElectricCoreDataVO(ElectricCoreDataDTO dto) {
        if (dto == null){
            return null;
        }
        ElectricCoreDataVO vo = new ElectricCoreDataVO();
        vo.setId(dto.getId());
         vo.setSubTaskId(dto.getSubTaskId());
         vo.setVoltage(dto.getVoltage());
         vo.setWeight(dto.getWeight());
         vo.setCellThickness(dto.getCellThickness());
         vo.setGroupThickness(dto.getGroupThickness());
         vo.setPositivePoleBottom1(dto.getPositivePoleBottom1());
         vo.setExplosionTrapBottom1(dto.getExplosionTrapBottom1());
         vo.setNegativePoleBottom1(dto.getNegativePoleBottom1());
         vo.setPositivePoleBottom2(dto.getPositivePoleBottom2());
         vo.setExplosionTrapBottom2(dto.getExplosionTrapBottom2());
         vo.setNegativePoleBottom2(dto.getNegativePoleBottom2());
         vo.setCreateTime(dto.getCreateTime());
         vo.setUpdateTime(dto.getUpdateTime());
         return vo;
    }
}
